<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/admin/login','AdminController@login');
Route::get('/admin/logout','AdminController@logout');
Route::post('/admin/login','AdminController@dologin');




Route::group(['middleware'=>'login'],function(){

	//后台页面
	Route::get('/admin','AdminController@index');

	//后台分类
	Route::controller('/type','TypeController');


	//博文分类
	Route::controller('/articlecate','ArticlecateController');

	//博文管理
	Route::controller('/article','ArticleController');

	//后台分类
	Route::controller('/type','TypeController');

	// Route::controller('article','ArticleController');

	//博文回复
	Route::controller('/blogreply','BlogController');

	//后台商品管理
	Route::controller('/goods','GoodsController');

	//后台用户
	Route::controller('/user','UserController');


	//后台评价
	Route::controller('comment','CommentController');

	//后台网站配置
	Route::controller('config','ConfigController');


	//后台网站相关
	Route::controller('someabout','SomeAboutController');

	//后台购物车管理
	Route::controller('goodscar','GoodsCarController');

	//后台图片轮播
	Route::controller('lunbo','LunboController');

	//后台友情链接
	Route::controller('link','LinkController');

	//后台商品广告
	Route::controller('goodsad','GoodsadController');

});
/*--------------------------------前台----------------------------------*/
//前台退出登录
Route::get('/home/logout','HomeController@logout');
Route::group(['middleware'=>'homelogin'],function(){


	//前台首页
	Route::get('/','HomeController@index');

	//前台404显示
	Route::get('/404','HomeController@error');


	//前台博客首页列表
	Route::get('/blog','HomeBlogController@index');
	//前台BLOG_single
	Route::get('/blog_single','HomeController@blog_single');

	//前台联系方式
	Route::get('/contact','HomeController@contact');

	//前台登录页面
	Route::get('/home/login','HomeController@login');
	Route::post('/home/login','HomeController@dologin');
	//前台BLOG显示
	Route::controller('/home','HomeController');

	//前台用户注册
	Route::get('/register','HomeController@register');
	Route::post('/register','HomeUserController@insert');
	//前台商品页面
	Route::get('/goods_list','HomeController@goods_list');

	//前台商品详情
	Route::get('/goods_info','HomeController@goods_info');

	//前台购物车
	Route::get('/wishlist','HomeController@wishlist');

	//前台商品显示
	// Route::get('/','HomeController@showgoods');

	//前台用户注册及个人信息修改
	Route::controller('/homeuser','HomeUserController');
	

	//前台用户个人信息
	Route::get('/detail','HomeController@detail');

	

});

Route::get('/get_content','GetContentController@getgoods');
